<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Detail Candidate</title>
<link rel="stylesheet" type="text/css" href="css/FinalProjectCSS.css"/>
<script type="text/javascript" src="table.js"></script>
<script type="text/javascript">
	function flyToPage(task,val) {
		if(task=='update'){
			document.forms[0].elements['cModel.userId'].value=val;
		}else{
			document.forms[0].nomor.value = val;
		}
		document.forms[0].task.value = task;
		document.forms[0].submit();
	}
</script>
</head>
<body>
	<center>
		<table width="100%" class="bodyTable boxShadow">
		
			<!-- HEADER -->
			<tr>
				<td colspan="2"><%@include file="/include/Header.jsp"%></td>
			</tr>

			<!-- CONTAINER -->
			<tr>
				<td rowspan="2" width="200px" class="navigationBox"><%@include file="/include/Navigation.jsp"%></td>
				<td class="headerBox blueBackground leftAlign">
					<% if("candidate".equalsIgnoreCase(user.getRole())){ %>
						Profile Setting
					<%}else{ %>
						User Management > 
						<a href="/WebFinalProject/Candidate.do">Manage Candidate</a> > 
						Candidate Information
					<%} %>	
				</td>
			</tr>
			<tr>
				<td align="center" class="contentStyle" style="padding: 5px 7px;"><br>
					<html:form action="/Candidate" method="post">
						<html:hidden property="task" name="candidateForm" />
						<html:hidden property="nomor" name="candidateForm" />
						<html:hidden property="cModel.photo" name="candidateForm" />
						<html:hidden property="cModel.userId" name="candidateForm" />
						<table border="0" class="boxShadow" width="600px">	
							<tr>
								<td colspan="3" align="center" class="headerBox formHeaderBackground">Candidate Information</td>
							</tr>
							<tr height="1px"><td colspan="3">&nbsp;</td></tr>	
							<tr>
								<td align="center" colspan="3">
									<% String photoPath = (String) request.getAttribute("photoPath");
							
										if(photoPath==null){%>
										<img alt="" src="images/no-profile-img.gif" width="151px" height="227px" /><br>
										<% }else{%>
										<img alt="" src='<%= photoPath %>' width="151px" height="227px"/><br>
										<%}%>
								</td>
							</tr>
							<tr height="1px"><td colspan="3">&nbsp;</td></tr>
							<tr class="formListBackground">							
								<td class="formListStyle leftAlign" width="135px">Job Code</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.jobCd"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Reg No</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.regisNo"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">ID Card Number</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.idCardNum"/></td>
							</tr>
							<tr class="formListBackground">
								<td colspan="3" align="center" class="headerBox formHeaderBackground">Personal Information</td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Full Name</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.fullName"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Gender</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.gender"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Place of Birth</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.birthPlace"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Date of Birth</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.birthDte"/></td>
							</tr>	
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Religion</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.religion"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Marital Status</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.maritalStatus"/></td>
							</tr>	
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Address</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.address"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Postal Code</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.postalCode"/></td>
							</tr>	
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">City</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.city"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Country</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.country"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Province</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.province"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Email</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.email"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Phone Number</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.phoneNumber"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Mobile Number</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.mobileNumber"/></td>
							</tr>			
							<tr class="formListBackground">
								<td colspan="3" align="center" class="headerBox formHeaderBackground">Education Description</td>
							</tr>			
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Education Level</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.educationLevel"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Graduation Year</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.gradYear"/></td>
							</tr>			
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">School Name</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.schoolName"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">School City</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.schoolCity"/></td>
							</tr>	
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Majority</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.majority"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">GPA</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.gpa"/></td>
							</tr>
<!-- 							<tr> -->
<!-- 								<td class="formListStyle" colspan="3" align="center"><input type="button" class="buttonStyle" value="Back" onclick="javascript:flyToPage('cancel',3);"></td> -->
<!-- 							</tr> -->
							
							<% if("admin".equalsIgnoreCase(user.getRole())){ %>
							<tr class="formListBackground">
								<td colspan="3" align="center" class="headerBox formHeaderBackground">Status Information</td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Technical Test Place</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.techTestPlace"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Technical Test Date</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.techTestDate"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Technical Test Score</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.techTestScore"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Last Status</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.lastStatus"/></td>
							</tr>
							<tr class="formListBackground">
								<td class="formListStyle leftAlign">Note</td>
								<td class="formListStyle" width="10px">:</td>
								<td class="formListStyle leftAlign" colspan="2"><bean:write name="candidateForm" property="cModel.noteAdmin"/></td>
							</tr>
							<%} %>
							<% if("candidate".equalsIgnoreCase(user.getRole())){ %>
							<tr class="formListBackground">
								<td colspan="3" align="center" class="formListStyle">
									<table title="edit" style="cursor: pointer;" onclick="javascript:flyToPage('update','<bean:write name="candidateForm" property="cModel.userId"/>');">
										<tr>
											<td><img src="images/editButton.png"/></td>
											<td><b>&nbsp;Edit&nbsp;</b></td>
										</tr>
									</table>
<!-- 									<input type="button" value="Back" class="buttonStyle" onclick="javascript:flyToPage('manageTrainee');"> -->
								</td>
							</tr>	
							<%}else{ %>
							<tr class="formListBackground">
								<td colspan="3" align="center" class="formListStyle">
									<table title="back" style="cursor: pointer;" onclick="javascript:flyToPage('cancel',3);">
										<tr>
											<td><img src="images/backButton.png"/></td>
											<td><b>&nbsp;Back&nbsp;</b></td>
										</tr>
									</table>
<!-- 									<input type="button" value="Back" class="buttonStyle" onclick="javascript:flyToPage('manageTrainee');"> -->
								</td>
							</tr>	
							<%} %>	
						</table>
					</html:form><br>
				</td>
<!-- 											<tr > -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Gender</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.gender"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Place of Birth</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.birthPlace"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Date of Birth*</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.birthDte"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Religion</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.religion"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Marital Status</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.maritalStatus"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Address</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.address"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Postal Code</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.postalCode"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">City</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.city"/></td> --%>
<!-- 										</tr>				 -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Country</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.country"/></td> --%>
<!-- 										</tr> -->
										
<!-- 										<tr>  -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Province</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.province"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Email</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.email"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Phone Number</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.phoneNumber"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Mobile Number*</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.mobileNumber"/></td> --%>
<!-- 										</tr> -->
<!-- 									</table> -->
<!-- 								</td> -->
<!-- 							</tr> -->
<!-- 							<tr>	 -->
<!-- 								<td>&nbsp;</td> -->
<!-- 							</tr> -->
<!-- 							<tr> -->
<!-- 								<td align="center"><strong>Education Description<br><br></strong> -->
<!-- 									<table width="95%" border="1"> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Educational Level*</td> -->
<%-- 											<td colspan="2" style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.educationLevel"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Graduation Year</td> -->
<%-- 										 	<td colspan="2" style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.gradYear"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">School Name</td> -->
<%-- 											<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.schoolName"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 												<td style="vertical-align: middle; padding: 5px 7px;">School City</td> -->
<%-- 												<td style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.schoolCity"/></td>	 --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">Majority</td> -->
<%-- 											<td colspan="2" style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.majority"/></td> --%>
<!-- 										</tr> -->
<!-- 										<tr> -->
<!-- 											<td style="vertical-align: middle; padding: 5px 7px;">GPA</td> -->
<%-- 											<td colspan="2" style="vertical-align: middle; padding: 5px 7px;"><bean:write name="candidateForm" property="cModel.gpa"/></td> --%>
<!-- 										</tr> -->
<!-- 									</table> -->
<!-- 								</td> -->
<!-- 							</tr> -->
<!-- 							<tr> -->
<!-- 								<td>&nbsp;</td> -->
<!-- 							</tr> -->
<!-- 							<tr> -->
<!-- 								<td colspan="3" align="center"><input type="button" class="buttonStyle" value="Back" onclick="javascript:flyToPage('cancel',3);"></td> -->
<!-- 							</tr> -->
<!-- 					</table><br><br> -->
<%-- 					</html:form> --%>
<!-- 					</td> -->

			</tr>
			
			<!-- FOOTER -->
			<tr>
				<td align="center" colspan="3" class="headerBox blueBackground">&copy; OME.2014.All Rights Reserved.</td>
			</tr>
		</table>
	</center>
</body>
</html>